import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from "vuex-persistedstate";
import User from './module/User.js'
Vue.use(Vuex)


export default new Vuex.Store({
    state: {
        connect: "",
    },
    mutations: {
        CenterMutation(state, data) {
            state.Center = data
        },
        // setState(state, data) {
        //     state[data.key] = data.val
        // },
    },
    actions: {
        savecontent(context,n){
            context.state.connect = n;
       }
    },
    modules: {
        User,
    },
    plugins: [
        createPersistedState({
          paths: ["User"]
        })
      ]
})